<?php $host = sfConfig::get('app_host')?>

<?php $poll = Doctrine::getTable('Poll')->doFetchOne(array('isFeatured'=>'1','limit'=>1));?>
<?php if($poll):?>
<div class="home-flow-nohover" style="border:1px solid #ccc;width:240px;padding:0 10px;margin-bottom:15px;min-height:600px;z-index:1;">
	  <h2 class="title" style="border-bottom:1px solid #ccc;margin-bottom:10px;font-weight:bold;color:green;">
	      <?php echo $poll['title']?>
	  </h2>
	
		<?php if(isset($poll['body'])):?>
				<div class="description" style="margin:0 0 10px 0;"><?php //echo $poll['body']?></div>
		<?php endif?>
	
		<?php $rss = Doctrine::getTable('PollOption')->doFetchArray(array('pollId'=>$poll['id']));?>    
		<?php foreach ($rss as $rs):?>
				<label>
					<input type="radio" class="left" name="radio<?php echo $rs['id']?>" style="margin:5px 5px 0 15px;" />
					<?php echo $rs['body']?>
					<hr class="dotted" style="margin:10px 0;"/>
				</label>
		<?php endforeach?>

    <a href="<?php echo $host?>/content/branch2/type/teenage/last/1/catId/88" class="more left" style="margin-bottom:10px;">Бүх сонжоо</a>
    
    <?php if(isset($rs['content_id'])):?>
		    <a href="<?php echo url_for('content/leaf1?id='.$rs['content_id'])?>" class="more right" style="margin-bottom:10px;">Үргэлжлүүлэх &raquo;</a>
    <?php else:?>
    		<a href="<?php echo url_for('poll/detail?id='.$poll['id'])?>" class="more right" style="margin-bottom:10px;">Үргэлжлүүлэх &raquo;</a>
    <?php endif?>
    <br clear="all">
</div>
<?php endif?>